//
//  CouponView.h
//  U_APP
//
//  Created by angle yan on 2017/11/21.
//  Copyright © 2017年 Ezra. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface CouponView : UIView

/* The array of CGColorRef objects defining the color of left block
 * Defaults to whiteColor Animatable. */
@property (nonatomic, copy) NSArray *colors;

/** Shadow properties. **/
/* The color of the shadow. Defaults to opaque black. Colors created
 * from patterns are currently NOT supported. Animatable. */
@property(nonatomic, strong) UIColor *  shadowColor;

/* The opacity of the shadow. Defaults to 0.35 Specifying a value outside the
 * [0,1] range will give undefined results. Animatable. */
@property(nonatomic, assign) float shadowOpacity;

/* The blur radius used to create the shadow. Defaults to 16. Animatable. */
@property (nonatomic, assign) CGFloat shadowRadius;


/* The radius of coupon all around. Default 4 */
@property (nonatomic, assign) CGFloat radius;

/* The left block width. Default 100 */
@property (nonatomic, assign) CGFloat leftW;

/* The right block width. Default 68 */
@property (nonatomic, assign) CGFloat rightW;

/* The semicircle of coupon in leftW position. Default 4. */
@property (nonatomic, assign) CGFloat semicircle;

/* The right separator line color */
@property (nonatomic, strong) UIColor *sepLineColor;


+ (CouponView *)getCouponView;


/*  用法
 
 CouponView *coupon =  [CouponView getCouponView];
 coupon.center = self.view.center;
 coupon.colors = @[(__bridge id)[UIColor redColor].CGColor,
 (__bridge id)[UIColor blueColor].CGColor];
 coupon.shadowColor = [UIColor yellowColor];
 coupon.sepLineColor = [UIColor redColor];
 [self.view addSubview: coupon];
 
 */



@end
